<?php
/**
 * Author:xsc
 * Time:2023/9/8 14:35
 */

namespace App\Extensions;

class BaseService
{
    private static $instance = [];

    private function __construct()
    {

    }

    private function __clone()
    {

    }

    public static function getInstance()
    {
        if ((static::$instance[static::class] ?? []) instanceof static) {
            return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }

}
